import * as types from '../types'
import {Tools} from "../../lib/tools";


const state = {
    nextBtnDisabled: true,
    // nextBtnDisabled: false,
    SelfPortraitIDCardPath: '',
    SelfPortraitIDCardSize: '',
    nationalEmblemIDCardPath: '',
    nationalEmblemIDCardSize: '',
    IdentityWitnessIDCardPath: '',
    IdentityWitnessIDCardSize: '',
    imgurl1: require('@/assets/PersonPhoto/u57.png'),
    imgurl2: require('@/assets/PersonPhoto/u58.png'),
    imgurl3: require('@/assets/PersonPhoto/u59.png'),

}

const getters = {}

const actions = {}

const mutations = {
    [types.LEGALPERSONPHOTO_NEXT_BUTTON_CHECK](state) {
        if (
            Tools.check.isEmpty(state.SelfPortraitIDCardPath) ||
            Tools.check.isEmpty(state.nationalEmblemIDCardPath) ||
            Tools.check.isEmpty(state.IdentityWitnessIDCardPath)) {
            state.nextBtnDisabled = true
        } else state.nextBtnDisabled = false


    }
};

export default {
    namespaced: true,
    state,
    actions,
    mutations,
    getters
}